ActiveReports 19 .NET Edition
MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports.Document Namespace / PageDocument Class / Render Method / Render(IRenderingExtension,StreamProvider,NameValueCollection,Boolean,Boolean,CancellationToken,IProgress<ProgressInfo>) Method
The GrapeCity.ActiveReports.Extensibility.Rendering.IO.StreamProvider to store the rendered report output.
The System.Collections.Specialized.NameValueCollection that contains the settings for the GrapeCity.ActiveReports.Extensibility.Rendering.IRenderingExtension.
Set to True to force a refresh or query of the data even if the DataMap has already retrieved the required data.
Set to True to force a refresh or query of the parameter data.
Allows to stop rendering
The IProgress of type GrapeCity.ActiveReports.Rendering.Export.ProgressInfo provides progress updates.
Example

In This Topic
    Render(IRenderingExtension,StreamProvider,NameValueCollection,Boolean,Boolean,CancellationToken,IProgress<ProgressInfo>) Method
    In This Topic
    Renders a report using the specified rendering extension with the specified values and refreshed data.
    Syntax
    'Declaration
     
    Public Overloads Sub Render( _
       ByVal renderingExtension As IRenderingExtension, _
       ByVal streams As StreamProvider, _
       ByVal settings As NameValueCollection, _
       ByVal forceDataRefresh As Boolean, _
       ByVal forceParameterDataRefresh As Boolean, _
       ByVal token As CancellationToken, _
       ByVal progress As IProgress(Of ProgressInfo) _
    ) 

    Parameters

    renderingExtension
    streams
    The GrapeCity.ActiveReports.Extensibility.Rendering.IO.StreamProvider to store the rendered report output.
    settings
    The System.Collections.Specialized.NameValueCollection that contains the settings for the GrapeCity.ActiveReports.Extensibility.Rendering.IRenderingExtension.
    forceDataRefresh
    Set to True to force a refresh or query of the data even if the DataMap has already retrieved the required data.
    forceParameterDataRefresh
    Set to True to force a refresh or query of the parameter data.
    token
    Allows to stop rendering
    progress
    The IProgress of type GrapeCity.ActiveReports.Rendering.Export.ProgressInfo provides progress updates.
    Exceptions
    ExceptionDescription
    Thrown if the renderingExtension or streams is null.
    Thrown if something is wrong with the structure of the report.
    Thrown when a component cannot be granted a license.
    Thrown if validation problems occurred.
    Thrown when an error related to a report's parameter occurs.
    Thrown in a thread upon cancellation of an operation that the thread was executing.
    Example
    labelExport.Text = "Export started";
    var control = this;
    var progress = new Progress<ProgressInfo>(progressInfo =>
    {
    	control.BeginInvoke(new MethodInvoker(() =>
    	{
    		labelExport.Text = progressInfo.IsLast ? "Export is finished." : $"Exported {progressInfo.PageNumber} pages.";
    	}));
    });
    await Task.Run(() =>
    {
    	report.Document.Render(renderingExtension, outputProvider, settings, false, false, CancellationToken.None, progress);
    });
    See Also